# -*- coding: utf-8 -*-
# @File     : get_token.py
# @Authon   : hewenjun
# @Desc     : 描述
import requests


def get_token(login_info):
    headers = {'Content-Type': 'application/json'}
    params = {'p': 'android', 'v': '2.5.4'}
    resp = requests.post(url='https://api6-staging.mryitao.cn/api/user/mobileLoginV2', params=params, json=login_info,
                         headers=headers).json()
    mobile_token = {'tk': resp['data']['accessToken']}
    # print(mobile_token)
    return mobile_token